# -*- coding:utf-8 -*-
# 作者：NoamaNelson
# 日期：2021/8/4 9:47
# 文件名称：config.py
# 作用：存放全局变量
# 联系：VX(NoamaNelson)
# 博客：https://blog.csdn.net/NoamaNelson

# -*- coding:utf-8 -*-
# 作者：NoamaNelson
# 日期：2021/7/12 15:16
# 文件名称：config.py
# 作用：全局变量

import os
import datetime

# ========== 项目相关 ==========
BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))                 # 项目根目录
PROJECT_NAME = "School_Management"
NOW_TIME = datetime.datetime.now().strftime('%Y-%m-%d_%H_%M_%S')
DESCRIBE = "API接口自动化测试"

# ========== 用例目录 ==========
TEST_EXCEL_PATH = os.path.join(BASE_PATH, "case")                                       # excel测试用例的路径

# ========== 邮件相关信息 ==========
MAIL_SERVICE = "smtp.126.com"                                                           # 邮件服务
SEND_MAIL = "xxxx@126.com"                                                              # 发件箱
SEND_MAIL_PAS = "wtretr5454"                                                            # 发件箱授权码
RECEIVE_MAIL = ["565675dfsdf@qq.com"]                                                   # 多个接受地址，可用逗号隔开

# ========== 日志存放路径 ==========
LOG_PATH = os.path.join(BASE_PATH, "log")                                               # log日志存放路径
LOG_PATH_NAME = os.path.join(LOG_PATH, f"{PROJECT_NAME}-{NOW_TIME}-test.log")           # log日志名称

# ========== 报告存放路径 ==========
REPORT_PATH = os.path.join(BASE_PATH, "report")                                         # 测试报告存放路径
REPORT_PATH_NAME = os.path.join(REPORT_PATH, f"{PROJECT_NAME}-{NOW_TIME}-result.html")  # 测试报告名称(html)
REPORT_EXCEL = os.path.join(REPORT_PATH, f"{PROJECT_NAME}-{NOW_TIME}-result.xlsx")      # 测试报告名称(xlsx)

mm = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "log")

if __name__ == "__main__":
    print(BASE_PATH)
    print(mm)